package org.sang.common;

/**
 * Description: 生成主键 .<br>
 *
 * @author jm
 *     Created By 2018/4/4 下午2:37
 */
public class SnowflakeIdGeneratorUtils {

    private static SnowflakeIdGenerator snowflakeIdGenerator = new SnowflakeIdGenerator();

    public static String getId() {
        try {
            return String.valueOf(snowflakeIdGenerator.generate());
        } catch (Exception e) {
            throw new RuntimeException("获取主键失败", e);
        }
    }


}
